package com.bothin.experiment4.model;

import com.bothin.experiment4.utils.serializer.Date2LongSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Table(name = "contact")
@Data
public class Contact {
    /**
     * 主键
     */
    @Id
    @Column(name = "contact_id")
    private String contactId;

    @Column(name = "customer_id")
    private String customerId;

    @Column(name = "employee_id")
    private Integer employeeId;

    /**
     * 合同履行状态, 默认为未履行
     */
    @Column(name = "performance_status")
    private Integer performanceStatus;

    /**
     * 总价格
     */
    private BigDecimal money;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 修改时间
     */
    @Column(name = "update_time")
    private Date updateTime;

    public Contact() {
    }

    public Contact(String contactId, String customerId, Integer employeeId, Integer performanceStatus, BigDecimal money, Date createTime) {
        this.contactId = contactId;
        this.customerId = customerId;
        this.employeeId = employeeId;
        this.performanceStatus = performanceStatus;
        this.money = money;
        this.createTime = createTime;
    }

    public Contact(String contactId, String customerId, Integer employeeId, BigDecimal money, Date createTime) {
        this.contactId = contactId;
        this.customerId = customerId;
        this.employeeId = employeeId;
        this.money = money;
        this.createTime = createTime;
    }
}